package baseTest;

import java.util.Scanner;

public class Apple {
    public static void main(String[] args) {
         Scanner scanner = new Scanner(System.in);
         int[] arr = new int[10];
        for (int i = 0; i <arr.length ; i++) {
            arr[i] = scanner.nextInt();
        }
        int m = scanner.nextInt();
        int sum =0;
        for (int i = 0; i < arr.length; i++) {
            if (m+30>=arr[i]){
                sum++;
            }
        }
        System.out.println(sum);
    }
}
